<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>两⽇期，⽐较两个⽇期是否相同</title>
</head>
<body>
    
</body>
</html>
<script>
    var date1 = new Date('2022-10-24');
    var date2 = new Date('2021-10-24');
    console.log(date1 - date2 == 0);
</script>